package com.unione.map.view.fragment

import android.view.LayoutInflater
import android.view.View
import android.view.View.OnClickListener
import android.view.ViewGroup
import androidx.navigation.Navigation
import com.unione.map.R
import com.unione.map.constant.PageParamConstant
import com.unione.map.databinding.FragmentCreateMapStep1Binding
import com.unione.map.databinding.FragmentCreateMapStep2Binding
import com.unione.map.databinding.FragmentCreateMapStep3Binding
import com.unione.map.databinding.FragmentCreateMapStepFinalBinding
import com.unione.map.view.act.MainActivity
import com.unione.unione_base.view.BaseFragment

class CreateMapStepFinalFragment : AppBaseFragment<FragmentCreateMapStepFinalBinding>(),
    OnClickListener {
    private var buildingName: String = ""
    private var floorName: String = ""
    private var mapName: String = ""

    override fun onCreateViewBinding(
        inflater: LayoutInflater,
        parent: ViewGroup?
    ): FragmentCreateMapStepFinalBinding {
        return FragmentCreateMapStepFinalBinding.inflate(inflater, parent, false)
    }

    override fun init() {
        buildingName = arguments?.getString(PageParamConstant.KEY_BUILDING_NAME) ?: ""
        floorName = arguments?.getString(PageParamConstant.KEY_FLOOR_NAME) ?: ""
        mapName = arguments?.getString(PageParamConstant.KEY_MAP_NAME) ?: ""
        initView()
        initListeners()
    }

    private fun initView() {

    }

    private fun initListeners() {
        binding.clVoice.setOnClickListener(this)
        binding.clHome.setOnClickListener(this)
        binding.clBack.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        super.onClick(v)
        if (v == null) return
        val nvController =
            Navigation.findNavController(
                requireActivity() as MainActivity,
                R.id.fragment_container_view
            )
        when (v.id) {

        }
    }
}